import tables from '../components/table'
import {defineComponent ,ref} from "vue";
import pop from '../components/pop-up'
import { SaveFilled,DeleteFilled} from '@ant-design/icons-vue'
export default defineComponent({
    components: {
        tables,
        pop,
        // SaveFilled,
        // DeleteFilled
    },
    data() {
        const formList = [
            {type :1 , title:'项目名称',bind:[{ required: true, message: '项目名称不得为空' }]},
            {type :1 , title:'项目位置',bind:[{ required: true, message: '项目位置不得为空' }]},
            {type :2 , title:'项目数量'},
            {type :3 , title:'创建时间'},
            {type :4 , title:'创建描述'}
        ]
        const columns = [
            {title: '项目名称', dataIndex: 'name',},
            {title: '项目位置', dataIndex: 'age',},
            {title: '项目数量', dataIndex: 'age',},
            {title: '创建时间', dataIndex: 'address',},
            {title: '项目描述', dataIndex: 'age',},
            {title: '创建时间', dataIndex: 'address',},
            {title: '项目描述', dataIndex: 'aaa',},
            {title: '操作', dataIndex: 'age', fixed: 'right', width: 200,},
        ]
        const data = [
            {
                address: "London",
                age: 32,
                name: "322 0",
                aaa:111
            },
            {
                address: "London",
                age: 32,
                name: "322 0",
                aaa:111
            },
            {
                address: "London",
                age: 32,
                name: "322 0",
                aaa:111
            },
            {
                address: "London",
                age: 32,
                name: "322 0",
                aaa:111
            },
            {
                address: "London",
                age: 32,
                name: "322 0",
                aaa:111
            }, {
                address: "London",
                age: 32,
                name: "322 0",
                aaa:111
            }, {
                address: "London",
                age: 32,
                name: "322 0",
                aaa:111
            },
            {
                address: "London",
                age: 32,
                name: "322 0",
                aaa:111
            },
            {
                address: "London",
                age: 32,
                name: "322 0",
                aaa:111
            },
            {
                address: "London",
                age: 32,
                name: "322 0",
                aaa:111
            },
            {
                address: "London",
                age: 32,
                name: "322 0",
                aaa:111
            },
            {
                address: "London",
                age: 32,
                name: "322 0",
                aaa:111
            },
            {
                address: "London",
                age: 32,
                name: "322 0",
                aaa:111
            }
        ];
        const add = () => {
            this.$refs.child.showModal('新增');
        }
        const  edit = (e)=>{
            console.log(e)
        }
        const size = ref('large')
        return {
            formList,
            size,
            columns,
            data,
            add,
            edit
        };
    },
});